#pragma once

#include "ObservationImageLandmarks.h"
#include "ObservationLikelihoodEvaluator.h"

class CImageLandmarksLikelihoodEvaluator : public CObservationLikelihoodEvaluator {
public:
	CImageLandmarksLikelihoodEvaluator(void);
	~CImageLandmarksLikelihoodEvaluator(void);

public:
	/**
	 * distance of two landmarks: max( -((x1 - x2) / stdDev) ^ 2, MIN_LIKELIHOOD)
	 * pObs is predicted values
	 * for each landmark in true observation
	 *   find the corresponding one in predict observation, compute likelihood
	 *     if cannot find, return MIN_LIKELIHOOD
	 * sum all
	 * return average
	 */
	double eval(const mrpt::slam::CObservation* pObs1, const mrpt::slam::CObservation* pObs2) const ;


private:
	double stdDev;
	double stdDev2;

	double MIN_LIKELIHOOD;
};
